.class public Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;
.super Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
.source "LocalMusicViewHolder.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# static fields
.field private static i:J


# instance fields
.field private a:Landroid/widget/TextView;

.field private b:Landroid/widget/ImageView;

.field private c:Landroid/widget/ImageView;

.field private d:Landroid/widget/ProgressBar;

.field private e:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;

.field private f:I

.field private g:I

.field private h:Lcom/esfile/screen/recorder/picture/picker/adapter/holder/e;


# direct methods
.method public constructor <init>(Landroid/view/View;)V
    .locals 1
    .param p1    # Landroid/view/View;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    invoke-direct {p0, p1}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;-><init>(Landroid/view/View;)V

    .line 2
    sget v0, Les/x4;->audio_name:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->a:Landroid/widget/TextView;

    .line 3
    sget v0, Les/x4;->audio_play:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    .line 4
    sget v0, Les/x4;->audio_add:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->c:Landroid/widget/ImageView;

    .line 5
    sget v0, Les/x4;->audio_play_loading:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ProgressBar;

    iput-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->d:Landroid/widget/ProgressBar;

    return-void
.end method

.method private a(Landroid/view/View;Landroid/view/View;Ljava/lang/Boolean;)V
    .locals 3

    .line 20
    invoke-virtual {p3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    const/4 v1, 0x0

    const/16 v2, 0x8

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    goto :goto_0

    :cond_0
    const/16 v0, 0x8

    :goto_0
    invoke-virtual {p2, v0}, Landroid/view/View;->setVisibility(I)V

    .line 21
    invoke-virtual {p3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p2

    if-eqz p2, :cond_1

    const/16 v1, 0x8

    :cond_1
    invoke-virtual {p1, v1}, Landroid/view/View;->setVisibility(I)V

    return-void
.end method

.method private a(Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;)V
    .locals 3

    .line 11
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;->l()Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;

    move-result-object v0

    sget-object v1, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;->PREPARED:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;

    if-ne v0, v1, :cond_0

    .line 12
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->d:Landroid/widget/ProgressBar;

    const/4 v1, 0x1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    invoke-direct {p0, p1, v0, v1}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->a(Landroid/view/View;Landroid/view/View;Ljava/lang/Boolean;)V

    goto :goto_0

    .line 13
    :cond_0
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;->l()Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;

    move-result-object v0

    sget-object v1, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;->PLAYING:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;

    const/4 v2, 0x0

    if-ne v0, v1, :cond_1

    .line 14
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->d:Landroid/widget/ProgressBar;

    invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    invoke-direct {p0, p1, v0, v1}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->a(Landroid/view/View;Landroid/view/View;Ljava/lang/Boolean;)V

    .line 15
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    sget v0, Les/w4;->durec_music_select_pause_selector:I

    invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_0

    .line 16
    :cond_1
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;->l()Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;

    move-result-object v0

    sget-object v1, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;->STOPPED:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;

    if-eq v0, v1, :cond_2

    .line 17
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;->l()Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;

    move-result-object p1

    sget-object v0, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;->ERROR:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo$State;

    if-ne p1, v0, :cond_3

    .line 18
    :cond_2
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->d:Landroid/widget/ProgressBar;

    invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    invoke-direct {p0, p1, v0, v1}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->a(Landroid/view/View;Landroid/view/View;Ljava/lang/Boolean;)V

    .line 19
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    sget v0, Les/w4;->durec_music_select_play_selector:I

    invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    :cond_3
    :goto_0
    return-void
.end method

.method private d()V
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->h:Lcom/esfile/screen/recorder/picture/picker/adapter/holder/e;

    if-eqz v0, :cond_0

    const/4 v1, 0x0

    .line 2
    iget v2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->g:I

    iget v3, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->f:I

    iget-object v4, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->e:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;

    invoke-interface {v0, v1, v2, v3, v4}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/e;->b(ZIILcom/esfile/screen/recorder/picture/picker/data/AudioInfo;)V

    :cond_0
    return-void
.end method

.method private e()V
    .locals 7

    .line 1
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    .line 2
    sget-wide v2, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->i:J

    sub-long v2, v0, v2

    const-wide/16 v4, 0x12c

    cmp-long v6, v2, v4

    if-gez v6, :cond_0

    const-string v0, "LocalMusic"

    const-string v1, "click frequently!"

    .line 3
    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    .line 4
    :cond_0
    sput-wide v0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->i:J

    .line 5
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->h:Lcom/esfile/screen/recorder/picture/picker/adapter/holder/e;

    if-eqz v0, :cond_1

    const/4 v1, 0x0

    .line 6
    iget v2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->g:I

    iget v3, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->f:I

    iget-object v4, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->e:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;

    invoke-interface {v0, v1, v2, v3, v4}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/e;->a(ZIILcom/esfile/screen/recorder/picture/picker/data/AudioInfo;)V

    :cond_1
    return-void
.end method


# virtual methods
.method public synthetic a(Landroid/view/View;)V
    .locals 0

    .line 2
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    invoke-virtual {p1}, Landroid/widget/ImageView;->performClick()Z

    return-void
.end method

.method public a(Lcom/esfile/screen/recorder/picture/picker/adapter/holder/e;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->h:Lcom/esfile/screen/recorder/picture/picker/adapter/holder/e;

    return-void
.end method

.method public a(Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;II)V
    .locals 2

    .line 3
    iget-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;

    new-instance v1, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/a;

    invoke-direct {v1, p0}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/a;-><init>(Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 4
    iput-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->e:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;

    .line 5
    iput p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->f:I

    .line 6
    iput p3, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->g:I

    .line 7
    iget-object p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->a:Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;->k()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 8
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    invoke-virtual {p1, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 9
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->c:Landroid/widget/ImageView;

    invoke-virtual {p1, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 10
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->e:Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;

    invoke-direct {p0, p1}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->a(Lcom/esfile/screen/recorder/picture/picker/data/AudioInfo;)V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->c:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_0

    .line 2
    invoke-direct {p0}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->d()V

    goto :goto_0

    .line 3
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->b:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_1

    .line 4
    invoke-direct {p0}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/LocalMusicViewHolder;->e()V

    :cond_1
    :goto_0
    return-void
.end method
